package com.chuantou.yuba.api.to;

import com.google.gson.annotations.SerializedName;

import android.os.Parcel;
import android.os.Parcelable;

public class IdNameTO implements Parcelable {
	@SerializedName("id")
	private int id;
	@SerializedName("name")
	private String name;

	public IdNameTO(Parcel source) {
		this.id = source.readInt();
		this.name = source.readString();
	}

	public IdNameTO() {
	}

	public IdNameTO(int id, String name) {
		super();
		this.id = id;
		this.name = name;
	}

	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeInt(id);
		dest.writeString(name);
	}

	public static final Creator<IdNameTO> CREATOR = new Creator<IdNameTO>() {

		@Override
		public IdNameTO[] newArray(int size) {
			return new IdNameTO[size];
		}

		@Override
		public IdNameTO createFromParcel(Parcel source) {
			return new IdNameTO(source);
		}
	};

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

}
